Repository navigation
[ROCm][Refactor] Enable GPTQMarlinConfig on ROCm to use choose_mp_linear_kernel - #885
Merged
Merged
Conversation
…ear_kernel
On ROCm, GPTQ models were forced through the legacy GPTQConfig →
GPTQLinearMethod → ops.gptq_gemm path, bypassing the
choose_mp_linear_kernel framework entirely. This meant any new kernel
added to the MPLinearKernel registry (Conch, future kernels) would
never be used for GPTQ models on ROCm.
This change allows GPTQMarlinConfig to be selected on ROCm by using
is_cuda_alike() instead of is_cuda() in the compatibility check, and
skips the NVIDIA device_capability gate in query_marlin_supported_quant_types
on ROCm (since ROCm device capabilities do not map to NVIDIA compute
capability semantics).
Also fixes ConchLinearKernel to handle symmetric quantization (no zero
points) by clearing the raw packed qzeros attribute on the layer, so
_get_weight_params returns None for w_zp. Without this fix, the
unprocessed packed qzeros tensor was passed to the Conch Triton kernel,
causing an illegal memory access.
Before this change, GPTQ on ROCm used ops.gptq_gemm (ExLlama v2)
directly. After this change, choose_mp_linear_kernel selects
ConchLinearKernel by default. ExllamaLinearKernel (same ops.gptq_gemm
kernel as before) can be used via
VLLM_DISABLED_KERNELS=ConchLinearKernel.
Benchmarked on AMD Strix Halo (gfx1151, LPDDR5X-8000 128 GB):
Model: TheBloke/Llama-2-7B-Chat-GPTQ
input-len=128, output-len=128, num-prompts=5:
ConchLinearKernel (default):
Median TTFT: 112 ms
Median TPOT: 90.50 ms
ExllamaLinearKernel:
Median TTFT: 168 ms
Median TPOT: 19.24 ms
Accuracy (lm_eval gsm8k, 200 samples, ExllamaLinearKernel):
TheBloke/Llama-2-7B-Chat-GPTQ: 0.135 → 0.140 (no regression)
Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
marcusr-amd
approved these changes
Apr 17, 2026
eble-amd
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On ROCm, GPTQ models were forced through the legacy GPTQConfig → GPTQLinearMethod → ops.gptq_gemm path, bypassing the choose_mp_linear_kernel framework entirely. This meant any new kernel added to the MPLinearKernel registry like our Hybrid int4 GEMM would never be used for GPTQ models on ROCm.
This change allows GPTQMarlinConfig to be selected on ROCm by using is_cuda_alike() instead of is_cuda() in the compatibility check, and skips the NVIDIA device_capability gate in query_marlin_supported_quant_types on ROCm (since ROCm device capabilities do not map to NVIDIA compute capability semantics).
Using the new kernel improves perf and unifies GPTQ models to use the same kernels as AWQ models